var app = angular.module('myApp',['ui.router', 'angularCSS','me-lazyload']);
        app.run(['$window', '$rootScope' , function ($window, $rootScope) {
            $rootScope.$on('$locationChangeSuccess', function () {
                //如果浏览器地址包含 market（闪送超市）那么就隐藏footer
                if (($window.location.href.indexOf('msg')!= -1) ||($window.location.href.indexOf('shopping')!= -1) ||($window.location.href.indexOf('shangpin')!= -1)|| ($window.location.href.indexOf('kefu')!= -1) || ($window.location.href.indexOf('login')!= -1) || ($window.location.href.indexOf('yinhang')!= -1) || ($window.location.href.indexOf('account')!= -1) || ($window.location.href.indexOf('kuaijie')!= -1) || ($window.location.href.indexOf('all')!= -1)) {
                    $rootScope.rootIsFooterShow = false;
                } else {
                    $rootScope.rootIsFooterShow = true;
                }

            });
        }])
        app.config(['$stateProvider','$urlRouterProvider',function($stateProvider,$urlRouterProvider){
            $urlRouterProvider.when('','/home').when('/login','/login/putong').when("/clothes","/clothes/guangchang")
            $stateProvider.state('home',{
                url:'/home',
                templateUrl:'./home/home.html'
                //  controller:'g-header'
            }).state('mine',{
                url:'/mine',
                templateUrl:'./mine/mine.html',
                // controller:"f-myController"
            }).state('city',{
                url:'/city',
                templateUrl:'./city/city.html'
            }).state('clothes',{
                url:'/clothes',
                templateUrl:'./clothes/clothes.html'
            }).state('collect',{
                url:'/collect',
                templateUrl:'./collect/collect.html'
            }).state('login',{
                url:'/login',
                templateUrl:'./city/login.html'
            }).state('login.putong',{
            	url:'/putong',
            	templateUrl:'./city/putong.html'
            }).state('login.kuaijie',{
            	url:'/kuaijie',
            	templateUrl:'./city/kuaijie.html'
            }).state('account',{
                url:'/account',
                templateUrl:'./mine/account.html'
            }).state('kefu',{
                url:'/kefu',
                templateUrl:'./mine/kefu.html'
            }).state('register',{
            	url:'/register',
            	templateUrl:'./city/register.html'
            }).state('zhmm',{
            	url:'/zhmm',
            	templateUrl:'./city/zhmm.html'
            }).state('msg',{
                url:'/msg',
                templateUrl:'./home/msg.html'
            }).state('shopping',{
                url:'/shopping',
                templateUrl:'./mine/shopping.html'
            }).state('all',{
                url:'/all',
                templateUrl:'./mine/all.html'
            }).state('yinhang',{
                url:'/yinhang',
                templateUrl:'./mine/yinhang.html'
            }).state('edit',{
                url:'/edit',
                templateUrl:'./collect/edit.html'
            }).state('shangpin',{
                url:'/shangpin',
                templateUrl:'./collect/shangpin.html'
            }).state('clothes.guangchang',{
                url:'/guangchang',
                // template:'<h1>广场</h1>'
                templateUrl:'./clothes/guangchang.html'
            }).state('clothes.sajiao',{
                url:'/sajiao',
                // template:'<h1>撒娇</h1>'
                templateUrl:'./clothes/sajiao.html'
            }).state('clothes.sajiao.pengyouquan',{
                url:'/pengyouquan',
                // template:'<h1>撒娇1</h1>'
                templateUrl:'./clothes/pengyouquan.html'
            }).state('clothes.sajiao.renyuanhao',{
                url:'/renyuanhao',
                // template:'<h1>撒娇2</h1>'
                templateUrl:'./clothes/renyuanhao.html'
            })

        }])
